$(function(){
	$('#searchoder').click(function(){
		var searchoderId=$('#searchoderId').val();
		if(searchoderId!=""){
			showRight('/backsearchoder',searchoderId);		/*index.js中的方法*/
		}else{
			alert("请输入订单号")
		}
	})
		
	
})

function deleteOder(oderId){
	if(window.confirm('确定要删除该订单吗')){
		$.ajax({
			url:'/delete/oder',
			type:'post',
			data:{
				oderId:oderId
			},
			success:function(response){
				if(response=="succ"){
					alert('删除成功！')
					showRight('/backoderlist')
				}
				if(response=='erro'){ alert('删除订单失败') }
				if(response=='nologin'){
                    	location.href='/adminlogin'
                    }
			},
			error:function(){
				alert('请求错误')
			}
		})
	}
}